#ifndef HQTEXTSTREAM_H
#define HQTEXTSTREAM_H
#include <QFile>
#include <QTextStream>
struct FileOffset//文件坐标
{
    bool result;//搜索结果 真/否
    int line;   //搜索结果行数
    int length; //搜索结果列数
};
struct Searchreturn
{
    bool result;
    int many;
    std::vector<FileOffset> offset;
};
void InitializeFile(QString url);
int GetFileTextLine(QString url);
int GetFileTextlength(QString url,int line);
QString GetFileText(QString url);
QString GetFileText(QString url,int line);
QString GetFileText(QString url,int line,int length);
void WriteFileTextAdd(QString url,QString date);
void WriteFileTextAdd(QString url,QString date,int line);
void DeleteFileText(QString url,int line);
FileOffset Search(QString url,QString searchWord);
FileOffset Search(QString url,QString searchWord,int StartLine,int StartLength);
FileOffset Search(QString url,QString searchWord,int length);
Searchreturn FuzzySearch(QString url,QString searchWord);
Searchreturn FuzzySearch(QString url,QString searchWord,int StartLine,int StartLength);
#endif // HQTEXTSTREAM_H
